package com.ly.controller;

import com.ly.entity.Bbook;
import com.ly.service.BbookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

@Controller
public class TestController {
    @Autowired
    BbookService bbookService;

    @RequestMapping("/test")
    public String test(Map<String,Object> map){

        List<Bbook> bbooks = bbookService.selectByCondition(new Bbook());
        map.put("book",bbooks);
        return "test";
    }

}
